import { Body, Controller, Post } from '@nestjs/common';
import { ClassificationService } from "./classification.service";
import { ApiBasicAuth, ApiExtraModels, ApiOperation, ApiTags } from "@nestjs/swagger";
import { ClassificationEntity } from "./classification.entity";
import { ApiResult } from 'src/decorators/api-result.decorator';
import { ResultVo } from 'src/vo/common/result.vo';

@ApiExtraModels(ClassificationEntity, ResultVo)
@Controller('classification')
@ApiTags('分类管理')
@ApiBasicAuth("token")
export class ClassificationController {
    constructor(private readonly classificationService: ClassificationService) { }

    @Post("queryAll")
    @ApiResult(ClassificationEntity, true)
    @ApiOperation({ summary: '查询所有分类接口' })
    async queryAll() {
        return await this.classificationService.queryAll();
    }
}
